<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<% 
String pword = new String(request.getParameter("password2").getBytes("ISO-8859-1"),"UTF-8");
boolean flag = false;
String str = "\\w{1,20}";			//新密码必须为u1~20位数字、字母、或下划线。
if(pword.matches(str)){
	flag = true;
	out.println("<span id='w3'><font color = green>Password is available!</font></span>");
}else{
	out.println("<span id = 'w3'><font color = red>Password must be letters or digits or underscore!</font></span>");
}
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>

</body>
</html>